package com.fyh.feign;

import com.fyh.entity.common.Result;
import com.fyh.entity.job.DeliveryRecord;
import com.fyh.feign.fallback.EmployerChatFeignClientFallback;
import org.apache.ibatis.annotations.Update;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

@FeignClient(name = "service-chat", fallback = EmployerChatFeignClientFallback.class, path = "/chat")
public interface EmployerChatFeignClient {
    /**
     * 添加联系人
     *
     * @param contactId
     * @param userId
     * @return
     */
    @PutMapping("/addContact")
    Result addChatContact(@RequestParam("contactId") Long contactId, @RequestHeader("userId") Long userId);

    /**
     * 发送投递状态变更通知给投递者
     *
     * @param deliveryRecord
     */
    @PostMapping("/sendDeliveryStatusInform")
    Result sendDeliveryStatusInform(@RequestBody DeliveryRecord deliveryRecord);
}
